import React, { useState } from 'react';

// 函数组件修改相同的状态,不会重新render
const Fn = () => {
  const [num, setNum] = useState(0);
  console.log(123123);
  return (
    <div>
      {console.log(321321)}
      函数组件
      <br />
      <button onClick={() => setNum(0)}>({num})</button>
    </div>
  );
};

export default Fn;
